<template>
    <div :style="style.one">
        <span :style="style.left" v-text="Lang.from[lang][2]+':'"></span>
        <hb-select :style="style.right" class="ilbk" :title="orderList[selectType].value" :list="orderList" @select="e_select" :circle="true" lorr="left" />
    </div>
</template>

<script>
import style from './style.jsx'
import Lang from './lang.js'
export default {
	name: 'formitems',
	data() {
		return {
			Lang,
			style,
			selectType:0,
			selected: '买入',
		}
	},
	computed: {
		lang() {
			return this.$store.state.setting.lang
		},
		orderList() {
			return [
				{value: Lang.from[this.lang][3], txt: Lang.from[this.lang][3]},
				{value: Lang.from[this.lang][4], txt: Lang.from[this.lang][4]},
			]
		},
	},
	created() {
		this.e_select(0, '买入')
	},
	methods: {
		e_select(i, v) {
			this.selectType = i
			this.selected = this.orderList[i].value
			let box = [0, 1]
			this.$emit('select', 'type', box[i])
		},
	},
}
</script>

<style scoped>
</style>